package com.example.shirodemo2.shiro.utils;

import com.demo.bean.User;
import org.apache.shiro.SecurityUtils;

/**
 * Shiro工具类
 *
 * @author : SPL
 * @since : 2020-05-28 11:35
 **/
public class ShiroUtil extends SecurityUtils {

    /**
     * 获取当前登录用户
     *
     * @return
     */
    public static User getCurrentUser() {
        return (User) getSubject().getPrincipal();
    }

}
